angular.module('start.common.message.ctrl', [])

  .controller('MessageCtrl', function($scope, $location, $rootScope, $stateParams, $$MessageService) {
    console.log("messageCtrl");
    $scope.messageIndex = $stateParams.messageId;
    // $rootScope.messageData = ;

    if ($rootScope.messageData == undefined) {
      $location.path("tab/user");
      return;
    }
    // 修改状态 为已读
    $$MessageService.userupdateNotify($rootScope.messageData.id, $rootScope.messageData.state, 0)
      .then(function(res) {});

  });
